home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20000217-20000824
/
000459_news@columbia.edu _Wed Aug 16 10:42:52 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2000-08-23
|
6KB
Return-Path: <news@columbia.edu>
Received: from watsun.cc.columbia.edu (watsun.cc.columbia.edu [128.59.39.2])
by uhaligani.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id KAA28121
for <kermit.misc@cpunix.cc.columbia.edu>; Wed, 16 Aug 2000 10:42:52 -0400 (EDT)
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id KAA16890
for <kermit.misc@watsun.cc.columbia.edu>; Wed, 16 Aug 2000 10:42:51 -0400 (EDT)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id KAA20872
for kermit.misc@watsun.cc.columbia.edu; Wed, 16 Aug 2000 10:29:49 -0400 (EDT)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
From: fdc@columbia.edu (Frank da Cruz)
Subject: Re: Newbie question
Date: 16 Aug 2000 14:29:48 GMT
Organization: Columbia University
Message-ID: <8ne8gs$kc6$1@newsmaster.cc.columbia.edu>
To: kermit.misc@columbia.edu
In article <8nd1lo$7a5$1@samba.rahul.net>,
Clarence Dold <dold@rahul.net> wrote:
: : Clarence Dold <dold@rahul.net> wrote:
: : : I use K95 to log in to a "system", using the supplied login.ksc.
: ...
: : : Can I have a moderately encrypted password file on unix, like the one for
: : : K95, so I don't have to key it in?
:
: Frank da Cruz <fdc@watsun.cc.columbia.edu> wrote:
: : There's a section in the C-Kermit book on this, starting on page 449 in the
: : second edition. Of course, this is leaving aside the question of using a
: : secure transport in the first place (like Kerberos, SSL, SRP, etc).
:
: This "system" is a simple gadget that happens to have a telnet interface,
: so I can't move to a secure transport, but the "pg 449" solution looks like
: the right spot.
:
: I found two things that were confusing me, making me think I had done
: something wrong. One is in the autotelnet.ksc provided on the
: ckermit 7.0 CDROM.
: Feb 26 11:51 AUTOTELN.KSC. line 52
: if > \fsplit(\%1) 1 { ; Allow only one "word" here.
:
The idea here was to prevent the user from specifying a port, since the
autotelnet script wasn't designed to deal with non-Telnet ports (not that
it couldn't have been, but the idea is to demo the most common application).
: Since these are simple little devices, I don't have hosts entries for them,
: so I was putting in an IP address. fsplit returns "4" for the ipaddress
: because of the . separator, and asks for a host name repeatedly.
: This wouldn't be a problem if I was calling the macro and supplying the
: args, but I tried "testing" first. ;-(
:
You can specify break and include sets for \fsplit(). The autotelnet script
should use:
if > \fsplit(\%1,,,.)
(that's three commas and a period.) Thanks for noticing; I fixed the
local copy.
Aside (for those who might not have noticed): C-Kermit 7.0 gives you help for
built-in functions:
C-Kermit>help function split
\fsplit(s1,&a,s2,s3) - Assign string words to an array.
s1 = String
&a = array designator
s2 = optional break set.
s3 = optional include set.
Break and include sets are as in \fword().
All arguments are optional. If \&a[] not declared, it is created.
Returns integer:
Number of words assigned.
Use "show functions" to list the available functions and "help function xxx"
to get help about function xxx, where xxx can be \fxxx(), fxxx, or just xxx,
e.g. "help func \fsplit()", "help func fsplit", or "help func split".
: The other is a Windows-ism, and has to do with an associated snippet of code
: that I had been using on unix already, and was trying to move to K95.
: To track the separate "systems", I do some file name creation:
: log session \v(macro)_\v(line)_\v(ndate).log
: which works fine on unix, but on Win2k, the filename truncates to the ":"
: that is part of the \v(line). I fixed that portion with
: log session \v(macro)_\ftrim(\v(line),":teln").\v(ndate).log
:
: While I'm at it, I'd like the equivalent for awk gsub(), where
: I could substitute "_" for the "." in the IP address.
:
Subsequently you found \freplace() (string replacement), not that you need
it if you specify break/include sets to \fsplit(). Jeff also suggested
\fsubstitute() (character replacement, like Unix tr) but that's not in 7.0;
it will be in 7.1, to be announced for testing "shortly".
: Eventually, I'm going to get good at this kermit stuff.
:
: People are starting to hang around my cubbie, watching scripts flow by,
: as well as the seamless telnet/ftp/login tasks that they are all
: forced to cobble their way through, with the standard mix of
: Solaris/Linux/Windows tools.
:
Eventually I hope more people will begin to see the advantage of Kermit
scripting: scripts that are portable to many platforms, work with many
communication methods, and can do lots of stuff. Spread the word!
> This online pdf manual is going to be the death of me.
> how could I not locate \freplace() ?
> It just leaps out at me on the printed page, but I get searching and
> scrolling in the pdf and miss stuff ;-)
>
The PDF version of "Using C-Kermit" that comes with K95 was a business
decision of the publisher. I prefer real books too, but you don't always
have them with you, plus as you say, the PDF is searchable. Of course the
book is still available too.
The next edition will bring together the various scattered update notes,
etc, and should be more pleasant to use in PDF form since it will have been
designed for that from the beginning, rather than converted ex post facto.
So much to do, so little time...
- Frank